//package com.rentong.config;
//
//import org.springframework.context.annotation.Bean;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.http.ResponseEntity;
//import springfox.documentation.builders.ApiInfoBuilder;
//import springfox.documentation.builders.PathSelectors;
//import springfox.documentation.builders.RequestHandlerSelectors;
//import springfox.documentation.service.ApiInfo;
//import springfox.documentation.service.Contact;
//import springfox.documentation.service.Tag;
//import springfox.documentation.spi.DocumentationType;
//import springfox.documentation.spring.web.plugins.Docket;
//import springfox.documentation.swagger2.annotations.EnableSwagger2WebMvc;
//
//
//import java.time.LocalDate;
//
//@Configuration
//@EnableSwagger2WebMvc
//public class Swagger2Config {
//
//    @Bean
//    public Docket petApi() {
//        return new Docket(DocumentationType.SWAGGER_2)
//                .pathMapping("/")
//                .select()
//                .apis(RequestHandlerSelectors.basePackage("com.rentong"))
//                .paths(PathSelectors.any())
//                .build()
//                .directModelSubstitute(LocalDate.class, String.class)
//                //
//                .genericModelSubstitutes(ResponseEntity.class).useDefaultResponseMessages(false)
//                .enableUrlTemplating(false)
//                .tags(new Tag("music-server", "音乐播放器后台服务"))
//                .apiInfo(apiInfo());
//    }
//
//    private ApiInfo apiInfo() {
//        Contact contact = new Contact("音乐播放器后台服务", "http://www.lzzy.edu.cn/",
//                "jiangxuezhen@lzpu.edu.cn");
//        return new ApiInfoBuilder()//
//                .title("web应用项目音乐播放器提供的Api")//
//                .description("音乐播放器后台服务接口说明")//
//                .license("Music-Server License Version 2.0")//
//                .contact(contact)//
//                .version("2.0")//
//                .build();
//    }
//
//}